package com.amrit.java;

import java.util.HashMap;


public class ReviseJava {
	public static void main(String[] args) {
		HashMap<String, String> hm = new HashMap<String, String>();
		try{
			String sb[] = System.getProperties().toString().split(",");
			for (int i= 0;i<sb.length;i++){
				String sb1[] = sb[i].split("=");
				if(sb1.length == 2){
					hm.put(sb1[0], sb1[1]);
				} else {
					hm.put(sb1[0], null);
				}
			}
			System.out.println("Hashmap is : "+hm);
			System.out.println("-----------------------------------------------");
			System.out.println("Keys are : "+hm.keySet());
		}catch(Exception e){
			e.printStackTrace();
		} finally{
			System.out.println("Size of HashMap is: "+hm.size());
		}
	}
}
